package com.ruicar.afs.cloud.channel.affiliation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.channel.affiliation.condition.AffiliationCondition;
import com.ruicar.afs.cloud.channel.affiliation.entity.ChannelAffiliatedUnitsTemp;
import com.ruicar.afs.cloud.channel.affiliation.vo.ChannelAffiliatedUnitsTempVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author panhj
 */
public interface ChannelAffiliatedUnitsTempMapper extends BaseMapper<ChannelAffiliatedUnitsTemp> {

    /**
     * 根据条件查询全部挂靠信息
     *
     * @param page
     * @param affiliation
     * @param ids
     * @return ChannelAffiliatedUnitsTempInfo
     */
    IPage<List<ChannelAffiliatedUnitsTempVo>> getChannelAffiliatedUnitsTempInfo(Page page, @Param("query") AffiliationCondition affiliation, @Param("ids") List<Long> ids);

    IPage<List<ChannelAffiliatedUnitsTempVo>> getChannelAffiliatedUnitsTempApply(Page page, @Param("query") AffiliationCondition affiliation);

    /**
     * 根据条件查询是否修改挂靠信息
     *
     * @param socUniCrtCode
     * @param busiType
     * @return ChannelAffiliatedUnitsTemp
     */
    ChannelAffiliatedUnitsTemp getInfoByIdTypeSocUniCrtCode(@Param("socUniCrtCode") String socUniCrtCode, @Param("busiType") String busiType);
//    ChannelAffiliatedUnitsTemp getInfoByIdTypeSocUniCrtCode(@Param("affiliatedName")String affiliatedName,@Param("socUniCrtCode")String socUniCrtCode, @Param("busiType")  String busiType);

    /**
     * 根据条件查询挂靠列表
     *
     * @param page
     * @param affiliation
     * @return ChannelAffiliatedUnitsTemp
     */
    IPage<List<ChannelAffiliatedUnitsTemp>> getAffiliationInfo(Page page, @Param("query") AffiliationCondition affiliation);

    /**
     * 根据条件查询网约车合作平台
     *
     * @param socUniCrtCode
     * @return ChannelAffiliatedUnitsTemp
     */
    List getCooperPlatList(@Param("socUniCrtCode") String socUniCrtCode);
}
